libotutil: Port keyfile-utils.c to new style
authorColin Walters <walters@verbum.org>
Mon, 14 Oct 2019 13:19:28 +0000 (13:19 +0000)
committerColin Walters <walters@verbum.org>
Wed, 16 Oct 2019 13:30:21 +0000 (13:30 +0000)
commit810f24d8977aff903151379ef344146904967a85
treefc84439112a4f96a71b7b93e14fae632efe68f7a
parent347e234aaac98ffd69725969252e4930ceaec908
libotutil: Port keyfile-utils.c to new style

I was trying to fix a clang `scan-build` error that jlebon
ended up tracking down in
https://github.com/ostreedev/ostree/pull/1939/commits/9344de1ce1e8c185e01988277606ba1ed7f9d16b

But in the process of tracing through this I found it
way easier to read as "new style" code, so this also ports the
code.

I added a `g_assert()` in there too to help assert that
`g_key_file_get_value` won't leak in the error path.
src/libotutil/ot-keyfile-utils.c